package ch.ffhs.servers;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class OttosServer {

	public String sendState(Boolean active, Boolean dayModus,
			Integer alarmLevel, String latitude, String longitude) {
		DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
		Calendar cal = Calendar.getInstance();
		   
		String state = "Timestamp = " + dateFormat.format(cal.getTime());
		state += "; Active = " + active.toString();
		state += "; DayModus = " + dayModus.toString();
		state += "; Alarm-Level = " + alarmLevel.toString();
		if ((latitude.trim() != "") && (longitude.trim() != "")) {
			state += "; Position = " + latitude + "," + longitude;
		}

		System.out.println(state);

		return state;
	}
}
